import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class CustomCreatePanel extends JPanel {
	public JPanel customCreateOptions;
	public JPanel north;
	public JLabel northLabel;
	public JTextField gameName;
	private String northLabelPad = "     ";
	private JLabel gameNameLabel;
	public SMapPanel selectMapPanel;
	public STimeSettingsPanel selectTimeTypePanel;
	public SNumPlayersPanel selectNumPlayersPanel;
	public SGameTypePanel selectGameTypePanel;
	public SCardSettingsPanel sCardSettingsPanel;
	public Output o;

	public CustomCreatePanel(Output arg1) {
		o = arg1;
		this.setPreferredSize(new Dimension(750, 600));
		this.setBackground(Color.white.darker());
		this.setLayout(new BorderLayout());

		// border (top, left, bottom, right, color)
		north = new JPanel();
		north.setLayout(new BorderLayout());
		north.setPreferredSize(new Dimension(300, 69));
		north.setBackground(new Color(105, 105, 105));
		north.setBorder(BorderFactory.createCompoundBorder(BorderFactory
				.createMatteBorder(32, 0, 0, 10, Color.white.darker()),
				BorderFactory.createMatteBorder(2, 0, 2, 2, new Color(75, 75,
						75))));
		this.add(north, BorderLayout.NORTH);

		northLabel = new JLabel(northLabelPad + "Custom Game Creation");
		northLabel.setForeground(Color.white);
		northLabel.setFont(new Font("Dialog", Font.BOLD, 14));
		northLabel.setPreferredSize(new Dimension(350, 40));
		northLabel.setBorder(BorderFactory.createCompoundBorder(BorderFactory
				.createMatteBorder(2, 0, 2, 50, Color.white.darker()),
				BorderFactory.createMatteBorder(2, 0, 2, 2, new Color(75, 75,
						75))));
		north.add(northLabel, BorderLayout.WEST);

		JPanel northEast = new JPanel();
		northEast.setBackground(new Color(75, 75, 75));
		northEast.setLayout(new BorderLayout());
		northEast.setPreferredSize(new Dimension(300, 69));
		northEast.setBorder(BorderFactory.createCompoundBorder(BorderFactory
				.createMatteBorder(2, 2, 2, 2, Color.white.darker()),
				BorderFactory.createMatteBorder(2, 2, 2, 2, new Color(105, 105, 105))));
		north.add(northEast, BorderLayout.CENTER);

		gameNameLabel = new JLabel("Name:");
		gameNameLabel.setForeground(Color.white);
		gameNameLabel.setFont(new Font("Dialog", Font.BOLD, 14));
		gameNameLabel.setBackground(new Color(75, 75, 75));
		gameNameLabel.setPreferredSize(new Dimension(75, 40));
		gameNameLabel.setBorder(BorderFactory.createCompoundBorder(BorderFactory
				.createMatteBorder(2, 15, 2, 5, new Color(75, 75, 75)),
				BorderFactory.createMatteBorder(0, 0, 0, 0, new Color(75, 75,
						75))));
		northEast.add(gameNameLabel, BorderLayout.WEST);

		gameName = new JTextField("");
		gameName.setPreferredSize(new Dimension(400, 40));
		gameName.setBackground(new Color(105, 105, 105));
		gameName.setForeground(Color.white);
		gameName.setFont(new Font("Dialog", Font.BOLD, 13));
		gameName.setBorder(BorderFactory.createCompoundBorder(BorderFactory
				.createMatteBorder(2, 0, 2, 10, new Color(75, 75, 75)),
				BorderFactory.createMatteBorder(2, 4, 2, 4, new Color(105, 105,
						105))));
		northEast.add(gameName, BorderLayout.CENTER);

		customCreateOptions = new JPanel();
		customCreateOptions.setBackground(Color.white.darker());
		customCreateOptions.setLayout(new GridLayout(1, 5, 0, 0));
		this.add(customCreateOptions, BorderLayout.CENTER);

		selectMapPanel = new SMapPanel(o);
		customCreateOptions.add(selectMapPanel);

		selectNumPlayersPanel = new SNumPlayersPanel(o);
		customCreateOptions.add(selectNumPlayersPanel);

		selectGameTypePanel = new SGameTypePanel(o);
		customCreateOptions.add(selectGameTypePanel);

		sCardSettingsPanel = new SCardSettingsPanel(o);
		customCreateOptions.add(sCardSettingsPanel);

		selectTimeTypePanel = new STimeSettingsPanel(o);
		customCreateOptions.add(selectTimeTypePanel);

	}
}
